This code will help produce the three visuals that are going to be a
part of each equity tracker indicator webpage: regional map (tract
level) of most recent data, chart of the most recent data, chart of
trends over time.
If the indicator is available through a tract-level data
set. Getting the data to a workable version may require some
data transformation. To explore, clean, transform, and generate a final
data set, please use the data-gen-tract-template. This script
will generate an .rda for the map and an .rda for the charts. These data
sets will be loaded in before the data visualization code.
The release of toxic waste materials into the surrounding environment has a negative impact on peoples’ health and the environment in general. Differences between groups of people can highlight differing levels of exposure to toxic release. For this indicator, we are measuring the concentration of toxic site release as the pounds of release emitted within a two-mile buffer divided by the area of the buffer in acres, per census tract within the buffered zones.
To map data in this form, there should be a value corresponding to each census tract. Depending on the year or source of the data, this could be about 700 rows for data at the 2010 census tract resolution, or about 900 rows for data at the 2020 census tract resolution.
Source(s): U.S. Environmental Protection Agency, Toxics Release
Inventory Program, 2024; U.S. Census Bureau, Geography Division 2020
TIGER/Line Shapefiles
Toxic Releases by Community
Pounds per acre within 2 miles of release sites
U.S. Environmental Protection Agency, Toxics Release Inventory Program, 2024; U.S. Census Bureau, 2020-2024 American Community Survey 5-Year Estimates, Tables B02001, C17002, B22010, B11005, B11007, C16002
Toxic Releases Trend by Community
Pounds per acre within 2 miles of release sites, in 5-year spans between 2014 and 2024
U.S. Environmental Protection Agency, Toxics Release Inventory Program, 2014, 2019, 2024; U.S. Census Bureau, 2010-2014, 2015-2019, 2020-2024 American Community Survey 5-Year Estimates, Tables B02001, C17002, B22010, B11005, B11007, C16002
This step will transfer all of the Rmd output files (html and docx) to the network for review. It will keep the Rmd files within GitHub so that code is kept in a central place. Always run this chunk of code. If this is the first time you are generating visuals for an indicator, comment out the ‘update’ part of the ‘y.drive.folder.update’ variable because this is the first version that is being created.
This step will transfer the previous data and files to the archive folder. This step is meant to retain the older versions in case they are needed for reference. Only run this chunk of code if updating visuals for indicator - if there is already existing visuals on a webpage. Don’t run if this is the first time visuals are being created for indicator.
This step will clean the indicator folder to make room for the new versions. Only run this chunk of code if updating visuals for indicator - if there is already existing visuals on a webpage. Don’t run if this is the first time visuals are being created for indicator.
This step will move all of the updated data/files to the general indicator folder. They should be moved from the update (draft staging directory) to the parent folder so that the htmls can be copied to the webpage folder (outside the firewall). Only run this chunk of code if updating visuals for indicator - if there is already existing visuals on a webpage. Don’t run if this is the first time visuals are being created for indicator.
This step will help keep the folders organized and ready for the next update. Only run this chunk of code if updating visuals for indicator - if there is already existing visuals on a webpage. Don’t run if this is the first time visuals are being created for indicator.
This step copies the htmls for the webpage (3 visuals) from the network to the folder outside the firewall- this ‘external’ folder connects directly to the webpage. Always run this chunk of code.